-- GENERATED SPELL FOR [Cenarion Druid] --


function spell0_4052(pUnit, Event) --@Cat Form,Self--
pUnit:FullCastSpellOnTarget(5759,pUnit)
pUnit:RegisterEvent('Sorts_4052', 0, 1)
end

function spell1_4052(pUnit, Event) --@Tiger\'s Fury,Self--
pUnit:FullCastSpellOnTarget(5217,pUnit)
pUnit:RegisterEvent('Sorts_4052', 6000, 1)
end

function spell2_4052(pUnit, Event) --@Wrath,n/a--
pUnit:FullCastSpellOnTarget(9739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4052', 2000, 1)
end

function Sorts_4052(pUnit, Event)
local choix_sorts_4052 = math.random(0, 2)
if choix_sorts_4052 == 0 then
pUnit:RegisterEvent('spell0_4052', 1, 1)
end
if choix_sorts_4052 == 1 then
pUnit:RegisterEvent('spell1_4052', 1, 1)
end
if choix_sorts_4052 == 2 then
pUnit:RegisterEvent('spell2_4052', 1, 1)
end
end

function mob4052_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4052', math.random(1500, 3000), 1)
end

function mob4052_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4052_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4052_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4052, 1, 'mob4052_Action')
RegisterUnitEvent(4052, 2, 'mob4052_Leave')
RegisterUnitEvent(4052, 3, 'mob4052_Kill')
RegisterUnitEvent(4052, 4, 'mob4052_Die')
